<template>
	<el-drawer title="招商申请详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-form-item label="客户名称" prop="title">{{form.customer}}
					</el-form-item>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="政策类型" prop="policyName">{{form.policyName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="审批状态" prop="applyStatusName">{{form.applyStatusName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="审批人" prop="userName" maxlength="80">{{form.userName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="申请日期" prop="applyTime" maxlength="80">{{form.applyTime}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="申请内容" prop="applyContent">{{form.applyContent}}</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	emits: ['success', 'closed'],
	components: {AttachMenu},
	data() {
		return {
			loading: false,
			form: {
				customer:'',
				policyName:"",
				applyTime: '',
				applyStatus: '',
				policyContent: '',
				userName:'',
				applyStatusName:'',
			},
			visible: false,
			isSaveing: false,
			policyApplyList:[{"label":"人才落户","value":1},{"label":"房租减税","value":2},{"label":"装修补贴","value":3},{"label":"税费减免","value":4}]
			,applyStatusList:[{
						value: 1,
						label: '审批中'
					}, {
						value: 2,
						label: '已通过'
					}, {
						value: 3,
						label: '未通过'
					}]
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model) {
			this.model = model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data) {
			this.form = data;
			let applyStatus = this.applyStatusList.find((item) => item.value === data.applyStatus);
			if(applyStatus != undefined){
				this.form.applyStatusName =applyStatus.label; 
			}
		},
	}
}
</script>
<style>
</style>
